﻿

using Admin.EcsWeb.Option;
using Admin.EcsWeb.Service;
using Admin.EcsWeb.Service.Grpc;
using Admin.EcsWeb.Service.Remote;
using Admin.NET.Core.Service;
using Admin.NET.Core;
using Furion;
using Furion.Schedule;
using GeneralCommon.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using ProtoBuf.Grpc.Configuration;

namespace Admin.EcsWeb;
[AppStartup(1)]
public class Startup: AppStartup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddConfigurableOptions<GrpcOptions>();
        services.AddScoped<Service.Grpc.IGrpcService, GrpcService>();
        services.AddScoped<IGrpcChannelService, GrpcChannelService>();
        services.AddScoped<ILogService, LogService>();
        services.AddSingleton<ISignalRService, SignalRService>();
        services.AddSingleton<RemoteMessageService>();
        services.AddRemoteRequest();
       

        var service= App.GetService<RemoteMessageService>();
        service.Run();
    }

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
    }
}
